//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_glselchanged.sqf"
#include "x_setup.sqf"

#include "x_uiinc.sqf"

private ["_selection", "_control", "_selectedIndex", "_real_list", "_vlist"];
disableSerialization;
PARAMS_1(_selection);

_control = _selection select 0;
_selectedIndex = _selection select 1;

if (_selectedIndex == -1) exitWith {};

_real_list = [50, 25, 12.5];
_vlist = [(localize "STR_DOM_MISSIONSTRING_359"), (localize "STR_DOM_MISSIONSTRING_360"), (localize "STR_DOM_MISSIONSTRING_361")];
if (GVAR(graslayer_index) != _selectedIndex) then {
	GVAR(graslayer_index) = _selectedIndex;
	setTerrainGrid (_real_list select GVAR(graslayer_index));

	systemChat format [(localize "STR_DOM_MISSIONSTRING_686"),_vlist select GVAR(graslayer_index)];
};